home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr29 / mfil125.zip / EMXRT.DOC < prev    next >
Text File  |  1994-12-21  |  38KB  |  1,100 lines

  1. ===============================================================================
  2. emxrt.doc    emx 0.9a FIX 02     USER'S GUIDE TO THE EMX RUNTIME    21-Dec-1994
  3. ===============================================================================
  4.                                      Copyright (c) 1990-1994 by Eberhard Mattes
  5.  
  6.  
  7. 1 Table of Contents
  8. ===================
  9.  
  10. 1     Table of Contents
  11. 2     Introduction to the User's Guide to the emx Runtime
  12. 2.1     Hardware requirements
  13. 2.2     Files included in the emx runtime package
  14. 3     License
  15. 4     Installing the emx runtime package under OS/2
  16. 4.1     Summary for impatient OS/2 users
  17. 4.2     Detailed instructions for OS/2 users
  18. 5     Installing the emx runtime package under DOS
  19. 5.1     Summary for impatient DOS users
  20. 5.2     Detailed instructions for DOS users
  21. 6     Environment variables (OS/2 and DOS)
  22. 6.1     Environment variables (DOS)
  23. 7     DOS Notes
  24. 7.1     General notes
  25. 7.2     Emergency exit
  26. 7.3     Using rsx instead of emx
  27. 8     emx options
  28. 8.1     emx options (OS/2)
  29. 8.2     emx options (DOS)
  30. 9     The emxstack tool
  31. 10    Troubleshooting
  32. 10.1    Warning message `WARNING: emx 0.9a or later required'
  33. 10.2    unzip.exe says `cannot create emx/dll/emx.dll'
  34. 10.3    emx.dll cannot be deleted, renamed or overwritten
  35. 10.4    Error message `SYS1804: The system cannot find the file EMX.'
  36. 10.5    Error message `rsx not found, DPMI not supported by emx'
  37. 10.6    Error message `emx.dll: Stack size too small...'
  38. 10.7    DOS message `Sector not found'
  39. 11    emx messages
  40. 11.1    emx messages (OS/2)
  41. 11.2    emx messages (DOS)
  42. 12    Obtaining the complete emx package
  43. 13    The author of emx
  44.  
  45.  
  46. 2 Introduction to the User's Guide to the emx Runtime
  47. =====================================================
  48.  
  49. This is the documentation for the emx runtime package.  The emx
  50. runtime is an environment for 32-bit programs under OS/2 2.x, OS/2 3.x
  51. (OS/2, in short), MS-DOS, and PC-DOS (DOS, in short) on machines with
  52. a 386 CPU (or one of its successors).
  53.  
  54. Under OS/2, you can view the .inf version of this document by typing
  55.  
  56.     view \emx\book\emxrt
  57.  
  58. If you add \emx\book to the BOOKSHELF environment variable, you can
  59. type
  60.  
  61.     view emxrt
  62.  
  63. to view that on-line book.
  64.  
  65.  
  66. 2.1 Hardware requirements
  67. -------------------------
  68.  
  69. emx requires an 80386 CPU (80386DX, 80386SX, i486, or later)
  70.  
  71.  
  72. 2.2 Files included in the emx runtime package
  73. ---------------------------------------------
  74.  
  75. The emx runtime package includes the following files:
  76.  
  77.   \emx\bin\emx.exe              emx runtime for DOS
  78.   \emx\bin\emxbind.exe          Tool for modifying emx programs (DOS and OS/2)
  79.   \emx\bin\emxfpemu             Emulator for numeric coprocessor (DOS)
  80.   \emx\bin\emxl.exe             emx loader (used by emxbind)
  81.   \emx\bin\emxload.exe          Server for keeping OS/2 programs in memory
  82.   \emx\bin\emxrev.cmd           Tool for displaying emx revisions (OS/2)
  83.   \emx\bin\emxstack.exe         Tool for fixing the stack size of old programs
  84.   \emx\book\emxrt.inf           The text you are looking at (VIEW version)
  85.   \emx\dll\emx.dll              emx runtime for OS/2
  86.   \emx\dll\emxio.dll            Hardware port I/O under OS/2
  87.   \emx\dll\emxlibc.dll          Forwarder DLL to emxlibcm.dll (OS/2)
  88.   \emx\dll\emxlibcm.dll         Multithread C library (OS/2)
  89.   \emx\dll\emxlibcs.dll         Single-thread C library (OS/2)
  90.   \emx\dll\emxwrap.dll          Interface to 16-bit OS/2 functions (OS/2)
  91.   \emx\doc\emxrt.doc            The text you are looking at (text version)
  92.   \emx\etc\termcap.dat          Terminal data base for termcap-based programs
  93.  
  94.  
  95. 3 License
  96. =========
  97.  
  98. emx is free software; you can redistribute it and/or modify it under
  99. the terms of the GNU General Public License as published by the Free
  100. Software Foundation; either version 2, or (at your option) any later
  101. version.
  102.  
  103. emx is distributed in the hope that it will be useful, but WITHOUT ANY
  104. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  105. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  106. for more details.
  107.  
  108. You should have received a copy of the GNU General Public License
  109. along with emx; see the file COPYING.  If not, write to the Free
  110. Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  111.  
  112. See \emx\doc\COPYING.EMX and \emx\doc\COPYING for details.
  113.  
  114. Please note that source code for parts of the contents of emxrt.zip is
  115. contained in emxfix02.zip.
  116.  
  117.  
  118. 4 Installing the emx runtime package under OS/2
  119. ===============================================
  120.  
  121.  
  122. 4.1 Summary for impatient OS/2 users
  123. ------------------------------------
  124.  
  125. 1.  Add \emx\dll to LIBPATH (always use the latest copy of the .dll
  126.     files!)
  127.  
  128. 2.  Add \emx\bin to PATH
  129.  
  130. 3.  Reboot
  131.  
  132.  
  133. 4.2 Detailed instructions for OS/2 users
  134. ----------------------------------------
  135.  
  136. emx does not work with OS/2 1.x and in DOS mode of OS/2.
  137.  
  138. Before changing config.sys, make a backup copy of that file!
  139.  
  140. The emx runtime is implemented as a set of dynamic link libraries
  141. under OS/2:
  142.  
  143. emx.dll
  144.         emx run-time support for OS/2
  145.  
  146. emxio.dll
  147.         access to hardware ports for emx programs under OS/2
  148.  
  149. emxlibc.dll
  150.         forwarder DLL to emxlibcm.dll for existing applications that
  151.         use emxlibc.dll (which has been renamed to emxlibcm.dll)
  152.  
  153. emxlibcm.dll
  154.         multithread emx C library
  155.  
  156. emxlibcs.dll
  157.         single-thread emx C library
  158.  
  159. emxwrap.dll
  160.         32-bit wrappers for 16-bit OS/2 API functions
  161.  
  162. OS/2 looks for dynamic link libraries in the directories listed in the
  163. LIBPATH statement of your config.sys file.  Note that LIBPATH is not
  164. an environment variable!
  165.  
  166. At any time, at most one version of a dynamic link library is loaded.
  167. If there are different versions of a dynamic link library in the
  168. directories listed in the LIBPATH statement, the first one listed is
  169. loaded.  If you already have installed the emx dynamic link libraries,
  170. you should be careful to use the latest revision of those dynamic link
  171. libraries.  Newer emx dynamic link libraries work with older emx
  172. programs (however, you may have to apply emxstack), but newer emx
  173. programs don't work with older emx dynamic link libraries.  To find
  174. out about already installed emx dynamic link libraries, type
  175.  
  176.     cd \emx\bin
  177.     emxrev
  178.  
  179. If no emx dynamic link libraries are installed, no output is produced.
  180. If there are emx dynamic link libraries installed, the names and
  181. revision numbers are displayed, for instance
  182.  
  183.     EMX : revision = 30
  184.     EMXIO : revision = 30
  185.     EMXLIBC : revision = 30
  186.     EMXLIBCM : revision = 30
  187.     EMXLIBCS : revision = 30
  188.     EMXWRAP : revision = 30
  189.  
  190. Only directories listed in the LIBPATH statement are searched.  To
  191. find out the revision numbers of the dynamic link libraries of this
  192. package, type
  193.  
  194.     emxrev -d c:\emx\dll
  195.  
  196. if you have put the emx runtime package on drive C.  After running
  197. emxrev, you should quit the command processor by typing
  198.  
  199.     exit
  200.  
  201. to release the dynamic link libraries (they have been loaded by
  202. cmd.exe as emxrev is a REXX procedure).  Otherwise, you cannot rename,
  203. overwrite, or delete those files.  This also happens if one of the emx
  204. dynamic link libraries is currently used by a program.  If you get
  205. error message SYS0032, use
  206.  
  207.     pstat /L
  208.  
  209. to find out about the dynamic link libraries used by the programs
  210. currently running.  Terminate all the programs using emx.dll,
  211. emxio.dll, emxlibc.dll, emxlibcm.dll, emxlibcs.dll, or emxwrap.dll.
  212. The command
  213.  
  214.     emxload -qw
  215.  
  216. will unload programs kept in memory by emxload.exe.
  217.  
  218. Either copy the latest revisions of the emx dynamic link libraries
  219. (that is, those with the highest revision numbers) to a directory
  220. directory listed in the LIBPATH statement of config.sys or modify the
  221. LIBPATH statement to include the directory where the latest revisions
  222. of the emx dynamic link libraries can be found.
  223.  
  224. The directories of the LIBPATH statement are separated by semicolons.
  225. To add c:\emx\dll to the LIBPATH statement, append a semicolon -- if
  226. there is not yet a semicolon -- to the end of the line of config.sys
  227. that starts with
  228.  
  229.     LIBPATH=
  230.  
  231. Then, type the absolute name of the directory.  Example:
  232.  
  233.     LIBPATH=.;C:\OS2\DLL;C:\OS2\MDOS;C:\;C:\OS2\APPS\DLL;D:\EMX\DLL
  234.  
  235. Optionally, you can append a semicolon at the end.
  236.  
  237. Next, modify the line of config.sys starting with
  238.  
  239.     SET PATH=
  240.  
  241. to include the \emx\bin directory.  For instance, change
  242.  
  243.     SET PATH=C:\OS2;C:\OS2\SYSTEM;C:\OS2\MDOS\WINOS2;C:\OS2\INSTALL;
  244.     C:\;C:\OS2\MDOS;C:\OS2\APPS
  245.  
  246. to
  247.  
  248.     SET PATH=C:\OS2;C:\OS2\SYSTEM;C:\OS2\MDOS\WINOS2;C:\OS2\INSTALL;
  249.     C:\;C:\OS2\MDOS;C:\OS2\APPS;D:\EMX\BIN
  250.  
  251. As with LIBPATH, you have to put a semicolon between the path names
  252. and a trailing semicolon is optional.  Note that the last two examples
  253. are shown in two lines; in config.sys, however, the complete SET
  254. statement must be put into one line.
  255.  
  256. You might want to add \emx\book to the BOOKSHELF environment variable
  257. to simplify viewing the on-line documentation.  For instance, change
  258. the line
  259.  
  260.     SET BOOKSHELF=C:\OS2\BOOK;
  261.  
  262. of your config.sys file to
  263.  
  264.     SET BOOKSHELF=C:\OS2\BOOK;C:\EMX\BOOK
  265.  
  266. as with PATH, you have to put a semicolon between the path names and a
  267. trailing semicolon is optional.
  268.  
  269. Now, you should reboot to activate the changes to config.sys.  After
  270. booting, run
  271.  
  272.     emxrev
  273.  
  274. to verify that the latest revision of emx is now active.
  275.  
  276. If OS/2 says
  277.  
  278.     SYS1804: The system cannot find the file EMX.
  279.  
  280. when running an emx program, you have not correctly set the LIBPATH
  281. statement of config.sys.  See above for details.
  282.  
  283. When running an old program (which assumes that emx.dll creates a
  284. stack object if the stack size is too small), you will get an error
  285. message like
  286.  
  287.     emx.dll: Stack size too small.  Run
  288.       emxstack -f D:\BIN\PROGRAM.EXE
  289.     and try again.
  290.  
  291. Run emxstack as indicated by the error message to fix the stack size
  292. of the program.  If you can't (because you don't have write permission
  293. for the file), type
  294.  
  295.     set emxopt=-I
  296.  
  297. to make emx.dll ignore the problem.  However, the program will
  298. probably crash due to insufficient stack size.  Using the -I option is
  299. not recommended!
  300.  
  301.  
  302. 5 Installing the emx runtime package under DOS
  303. ==============================================
  304.  
  305.  
  306. 5.1 Summary for impatient DOS users
  307. -----------------------------------
  308.  
  309. 1.  Add \emx\bin to PATH or set EMX to point to \emx\bin\emx.exe
  310.  
  311. 2.  If you are using a memory manager which implements DPMI, enable
  312.     VCPI
  313.  
  314. 3.  Remove BREAK=ON from config.sys
  315.  
  316. 4.  Reboot
  317.  
  318.  
  319. 5.2 Detailed instructions for DOS users
  320. ---------------------------------------
  321.  
  322. emx programs for DOS come in two flavours: those which load emx.exe
  323. from a separate file and those which have the emx runtime emx.exe
  324. integrated in the executable file of the application program.
  325.  
  326. Before changing autoexec.bat and config.sys, make a backup copy of
  327. these files!
  328.  
  329. If you want to use a program which loads emx.exe, you have to put
  330. emx.exe into a directory which is listed in your PATH environment
  331. variable or you have to change the PATH environment variable (in
  332. autoexec.bat) to include the directory in which emx.exe can be found.
  333. For instance, if your autoexec.bat file contains the line
  334.  
  335.     path c:\dos;d:\bin
  336.  
  337. you have installed the emx runtime on drive D, you should modify that
  338. line to read
  339.  
  340.     path c:\dos;d:\bin;d:\emx\bin
  341.  
  342. You have to put a semicolon between the path names.
  343.  
  344. Alternatively, you can set an environment variable which directly
  345. points to the emx.exe executable.  If you use this method, your
  346. program can locate emx.exe more quickly.  If you have installed the
  347. emx runtime on drive D:, you should add the following line to your
  348. autoexec.bat file:
  349.  
  350.     set emx=d:\emx\bin\emx.exe
  351.  
  352. Note that a directory name is not sufficient -- you have to type the
  353. complete path name of the emx.exe file.
  354.  
  355. Programs of the second flavour, having emx.exe integrated, don't
  356. require \emx\bin added to the PATH environment variable or the EMX
  357. environment variable being set.  The program itself, however, may need
  358. changes to your autoexec.bat file.  See the documentation accompanying
  359. the program.  The following steps are required for both flavours of
  360. emx programs.
  361.  
  362. If you are using a memory manager (such as QEMM or EMM386 or 386max)
  363. which implements DPMI (DOS Protected Mode Interface), you have to
  364. change the invokation of that memory manager to enable VCPI as emx
  365. does not support DPMI.  See the documentation of your memory for
  366. details.  If your memory manager supports DPMI only (without VCPI),
  367. you have to remove or disable the memory manager.  Alternatively, you
  368. can use rsx, as indicated in section 7.3.  emx supports XMS and VCPI.
  369.  
  370. Examine your config.sys file: If there is a line
  371.  
  372.     BREAK=ON
  373.  
  374. in it, you should remove it as it causes trouble with emx and lots of
  375. other programs.
  376.  
  377. If you are using an Intel Inboard 386/PC, add the following line to
  378. autoexec.bat:
  379.  
  380.     set emxopt=-m3
  381.  
  382. If the swap file (used to swap memory pages to disk when running out
  383. of physical memory) should be in a specific directory or on a specific
  384. disk drive, set the EMXTMP environment variable in autoexec.bat.
  385. Example:
  386.  
  387.     set emxtmp=c:\tmp
  388.  
  389. Now, you should reboot to activate the changes to config.sys and
  390. autoexec.bat.
  391.  
  392.  
  393. 6 Environment variables (OS/2 and DOS)
  394. ======================================
  395.  
  396. The operation of emx and emx programs is controlled by several
  397. environment variables.  You might have to set one or more of the
  398. following environment variables:
  399.  
  400. INIT    used by termcap to find termcap.dat
  401.  
  402. TERM    used by termcap to define the terminal type
  403.  
  404. EMXETC  used by termcap to find termcap.dat
  405.  
  406. EMXOPT  emx options (see below)
  407.  
  408. EMXSHELL
  409.         overrides the COMSPEC environment variable.  You can use this
  410.         to run an alternate command processor (shell) from emx
  411.         programs
  412.  
  413. EMXPATH
  414.         search path for programs (usually not relevant)
  415.  
  416. PATH    search path for program (used if EMXPATH fails)
  417.  
  418. TERMCAP
  419.         used by termcap to find termcap.dat
  420.  
  421.  
  422. 6.1 Environment variables (DOS)
  423. -------------------------------
  424.  
  425. EMX     path name of emx.exe, used by programs which are bound with
  426.         emxl.exe (the emx loader) instead of emx.exe.  Set EMX to
  427.         speed up loading of emx.exe or to load a specific version of
  428.         emx.exe
  429.  
  430. EMXTMP  directory for the swap file
  431.  
  432. TMP     used if EMXTMP is not set
  433.  
  434.  
  435. 7 DOS Notes
  436. ===========
  437.  
  438.  
  439. 7.1 General notes
  440. -----------------
  441.  
  442. - emx requires DOS 3.0 or later
  443.  
  444. - emx does not support DPMI
  445.  
  446. - emx does not support DESQview without VCPI (use QEMM-386 with
  447.   DESQview)
  448.  
  449. - If emx doesn't work under DESQview (especially if it displays the
  450.   message
  451.  
  452.       Nonmaskable interrupt (NMI)
  453.  
  454.   either set the protection level to 0 or use the WATCHDOG=0 option of
  455.   QEMM-386.
  456.  
  457. - emx supports VCPI
  458.  
  459. - emx supports XMS.  Do not use emx with himem.sys 2.06 or earlier.
  460.  
  461. - emx checks for XMS version number 2.00 or later and for XMS driver
  462.   revision 2.06 or later, as older himem.sys drivers don't work
  463.   correctly.  You can override this check by using the -O emx option
  464.   (for drivers using a different revision numbering scheme), but emx
  465.   may not work with your XMS driver, anyway.  Actually, emx has not
  466.   been tested with himem.sys 2.05; 2.04 fails, 2.06 works.
  467.  
  468. - emx supports vdisk.sys 3.3 and later and most other RAM disk drivers
  469.  
  470. - emx uses (or tries to use) all available memory, whether
  471.   conventional, extended, or expanded memory.  If there isn't enough
  472.   memory, emx will swap to disk.  The swap file will be created in the
  473.   directory given by the EMXTMP environment variable.  If EMXTMP is
  474.   not set, TMP will be used.  If both variables are not set, the swap
  475.   file will be created in the root directory of the current drive.
  476.  
  477. - If a program uses floating point instructions and no numeric
  478.   coprocessor (387) is installed, emx tries to load the FPU (floating
  479.   point unit) emulator emxfpemu.  That file is first sought in the
  480.   directory from which emx.exe was loaded (this does not apply if
  481.   emx.exe is bound to the executable), then in the current working
  482.   directory and the directories listed in the EMXPATH and PATH
  483.   environment variables.  If emxfpemu cannot be found, the program
  484.   will be aborted by signal SIGFPE.
  485.  
  486.  
  487. 7.2 Emergency exit
  488. ------------------
  489.  
  490. If the computer freezes while running emx, try hitting Ctrl-Break five
  491. times in one scond.  That will terminate emx (and all emx processes
  492. run by that instance of emx) unless it is blocked in a DOS call.  If
  493. blocked in a DOS call, emx will terminate after return from that DOS
  494. call.
  495.  
  496.  
  497. 7.3 Using rsx instead of emx
  498. ----------------------------
  499.  
  500. rsx is a DPMI-compliant DOS extender which is more or less compatible
  501. to emx.  Moreover, rsx contains a floating point emulator.  rsx is
  502. free software and has been written by Rainer Schnittker.  As of this
  503. writing, rsx is assumed to be available for anonymous ftp as
  504.  
  505.     ftp.uni-bielefeld.de: /pub/systems/msdos/misc/dpmigcc5.zip
  506.     ftp.uni-stuttgart.de: /pub/systems/os2/emx-0.9a/contrib/dpmigcc5.zip
  507.     ftp.informatik.tu-muenchen.de:
  508.                           /pub/comp/os/os2/gnu/emx+gcc/contrib/dpmigcc5.zip
  509.  
  510. If the emx loader emxl.exe finds a DPMI server but no VCPI server, it
  511. tries to run rsx.exe instead of emx.exe.  The RSX environment variable
  512. will be used instead of the EMX environment variable for locating
  513. rsx.exe.
  514.  
  515. To load rsx.exe instead of emx.exe even if there is a DPMI server and
  516. a VCPI server (for instance if you need the floating point emulation
  517. of rsx), set the EMX environment variable to point to rsx.exe.  Note
  518. that rsx needs a DPMI server.
  519.  
  520.  
  521. 8 emx options
  522. =============
  523.  
  524. You can customize emx by setting the EMXOPT environment variable.
  525. This environment variable contains a list of options, similar to
  526. command line options.  The options must be separated by at least one
  527. blank.  Example:
  528.  
  529.     set emxopt=-c -h40
  530.  
  531.  
  532. 8.1 emx options (OS/2)
  533. ----------------------
  534.  
  535. -c      Disable core dumps caused by signals and exceptions
  536.  
  537. -h#     Set OS/2 file handle limit to #.  The number # must be between
  538.         10 and 255
  539.  
  540. -n      Suppress popups for exceptions.  As emx.dll displays an
  541.         appropriate error message and dumps core, popups are not
  542.         required
  543.  
  544. -q      All command line arguments passed to child processes will be
  545.         quoted unconditionally, that is, wildcard expansion and
  546.         response files won't work in child processes of processes for
  547.         which the -q option is in effect
  548.  
  549. -r*     Prepend drive letter * to absolute path names.  If a path name
  550.         starts with / but does not start with //, /dev/ or /pipe/, *
  551.         followed by a colon will be prepended.  If -rd has been given,
  552.         the file name \mydir\abc will be translated to d:\mydir\abc.
  553.         Note: this option can cause unexpected effects
  554.  
  555. -t      Truncate file names to 8.3
  556.  
  557. -x      Don't suppress wildcard expansion and response files if the
  558.         `MKS Korn shell' method of passing command line arguments is
  559.         used
  560.  
  561. -E      Run debuggee in same session (window) as debugger
  562.  
  563. -I      Don't complain about programs having too small a stack size.
  564.         Without the -I option, emx.dll displays an error message for
  565.         those programs, telling how to run emxstack to fix the stack
  566.         size.  With the -I option, the program is run despite of the
  567.         problem.  However, the program will probably crash due to
  568.         insufficient stack size.  Using the -I option is not
  569.         recommended!
  570.  
  571. -K      Don't use DosKillThread.  Due to bugs in OS/2, DosKillThread
  572.         may cause problems.  emx.dll automatically avoids using
  573.         DosKillThread for OS/2 2.1 and older.  For OS/2 2.11 and
  574.         later, you can use the -K option to disable usage of
  575.         DosKillThread.  Currently, DosKillThread is used only if
  576.         select() is applied to socket handles
  577.  
  578.  
  579. 8.2 emx options (DOS)
  580. ---------------------
  581.  
  582. -c      Disable core dumps caused by signals and exceptions
  583.  
  584. -d      Don't use extended memory
  585.  
  586. -e      Redirect the standard error handle (2) to standard output (1)
  587.  
  588. -h#     Set DOS file handle limit to #.  The number # must be between
  589.         10 and 255.  This option is ignored for DOS versions earlier
  590.         than 3.30.  This option does not change the emx limit for the
  591.         number of files per process -- that limit is always 40
  592.  
  593. -m1     Running on Fujitsu FMR70 (not implemented yet)
  594.  
  595. -m2     Running on NEC PC-98 (not implemented yet)
  596.  
  597. -m3     Running on Intel Inboard 386/PC
  598.  
  599. -o      Send the register dump of an exception to stdout.  Without -o,
  600.         the register dump is sent to the CON device.  You need -o for
  601.         redirecting the register dump to a file.
  602.  
  603.         emx now creates a core dump file (named `core') instead of a
  604.         register dump.  Please keep that file in case the author of
  605.         the program needs it for debugging.
  606.  
  607. -q      All command line arguments passed to child processes will be
  608.         quoted unconditionally, that is, wildcard expansion and
  609.         response files won't work in child processes of processes for
  610.         which the -q option is in effect
  611.  
  612. -r*     Prepend drive letter * to absolute path names.  If a path name
  613.         starts with / but does not start with //, /dev/ or /pipe/, *
  614.         followed by a colon will be prepended.  If -rd has been given,
  615.         the file name \mydir\abc will be translated to d:\mydir\abc.
  616.         Note: this option can cause unexpected effects
  617.  
  618. -t      Truncate file names to 8.3 format.  Each part of a pathname is
  619.         truncated to 8.3 format by taking the first 8 characters
  620.         before the dot and the first 3 characters after the dot.  This
  621.         is useful to compile programs on a FAT filesystem with minimal
  622.         changes
  623.  
  624. -E      Don't check for 387 coprocessor.  Assume no coprocessor is
  625.         present
  626.  
  627. -O      Override XMS version check.  By default, emx checks for XMS
  628.         version number 2.00 or later and for XMS driver revision 2.06
  629.         or later, as older himem.sys drivers don't work correctly.
  630.         You can override this check by giving the -O option (for
  631.         drivers using a different revision numbering scheme), but emx
  632.         may not work with your XMS driver, anyway.  Actually, emx has
  633.         not been tested with himem.sys 2.05; 2.04 fails, 2.06 works
  634.  
  635. -V      Display emx version.  On program start, the emx version will
  636.         be displayed
  637.  
  638. -X      Disable usage of XMS memory.  Usage of XMS memory with VCPI is
  639.         a new feature of emx.  If this happens to cause trouble, use
  640.         the -X option.
  641.  
  642.  
  643. 9 The emxstack tool
  644. ===================
  645.  
  646. The emxstack tool is used for displaying and fixing the stack size.
  647. Old programs assume that emx.dll allocates a stack object if the stack
  648. size is too small.  As emx.dll no longer does this, the stack size of
  649. the programs must be fixed.
  650.  
  651.     emxstack <command> [<options>] <file>...
  652.  
  653. The following commands are available:
  654.  
  655. -c
  656.  
  657.     Check whether the stack size should be fixed.  For each file, if
  658.     the stack size is too small, a message will be displayed.  If the
  659.     stack size is big enough, no message will be displayed.
  660.  
  661. -d
  662.  
  663.     Display the stack size.  For each file, the stack size in KByte
  664.     will be displayed.
  665.  
  666. -f
  667.  
  668.     Fix the stack size.  For each file, the stack size is fixed if it
  669.     is too small.
  670.  
  671. -s<size>
  672.  
  673.     Set the stack size.  For each file, the stack size is set to
  674.     <size> KByte.
  675.  
  676. -u<size>
  677.  
  678.     Update the stack size.  For each file, the stack size is set to
  679.     <size> KByte if it less than <size> KByte.  If the stack size is
  680.     not less than <size> KByte, the stack size won't be changed.
  681.  
  682. The following options are available:
  683.  
  684. -p
  685.  
  686.     Act on all files in the PATH.  The command is applied to each file
  687.     in a directory listed in the PATH environment variable.  No file
  688.     names must be given on the command line.
  689.  
  690. -q
  691.  
  692.     Be quiet.  No messages will be displayed.  However, error messages
  693.     won't be suppressed.
  694.  
  695. -v
  696.  
  697.     Be verbose.  Display additional messages.
  698.  
  699. Example:
  700.  
  701.     emxstack -f *.exe
  702.  
  703.  
  704. 10 Troubleshooting
  705. ==================
  706.  
  707. This section shows how to solve common problems involving the emx
  708. runtime.
  709.  
  710.  
  711. 10.1 Warning message `WARNING: emx 0.9a or later required'
  712. ----------------------------------------------------------
  713.  
  714. If this message appears, an out-of-date version of emx.dll is active.
  715. Make sure that the latest version of emx.dll is in a directory pointed
  716. to by the LIBPATH statement in your config.sys file.  Use
  717.  
  718.     emxrev -p c:\config.sys
  719.  
  720. to list all emx dynamic link libraries reachable by the LIBPATH
  721. statement of c:\config.sys (use the drive letter of your boot drive
  722. instead of c:).  To simplify things, you should keep only one version
  723. of each DLL.  Older programs work with newer emx DLLs, but not vice
  724. versa.
  725.  
  726.  
  727. 10.2 unzip.exe says `cannot create emx/dll/emx.dll'
  728. ---------------------------------------------------
  729.  
  730. This happens when you try to unpack emxrt.zip while a program is
  731. active which uses emx.dll.  Terminate all programs which use emx.dll
  732. and try again.  If you run emxrev, the command interpreter keeps
  733. emx.dll loaded until terminated.  Therefore, you should close all OS/2
  734. windows and full-screen sessions in which you have run emxrev.  All
  735. this also applies to emxlibcm.dll etc.
  736.  
  737.  
  738. 10.3 emx.dll cannot be deleted, renamed or overwritten
  739. ------------------------------------------------------
  740.  
  741. See the previous problem.
  742.  
  743.  
  744. 10.4 Error message `SYS1804: The system cannot find the file EMX.'
  745. ------------------------------------------------------------------
  746.  
  747. You have not correctly set the LIBPATH statement of config.sys,
  748. therefore emx.dll could not be found.
  749.  
  750.  
  751. 10.5 Error message `rsx not found, DPMI not supported by emx'
  752. -------------------------------------------------------------
  753.  
  754. The current version of emx cannot use DPMI.  Therefore, the loader
  755. tried to use rsx instead, but couldn't find rsx.  Remedy: install rsx
  756. or end the DPMI server (MS Windows).
  757.  
  758.  
  759. 10.6 Error message `emx.dll: Stack size too small...'
  760. -----------------------------------------------------
  761.  
  762. You tried to run an old program (which assumes that emx.dll creates a
  763. stack object if the stack size is too small).
  764.  
  765. Run emxstack as indicated by the error message to fix the stack size
  766. of the program.  If you can't (because you don't have write permission
  767. for the file), type
  768.  
  769.     set emxopt=-I
  770.  
  771. to make emx.dll ignore the problem.  However, the program will
  772. probably crash due to insufficient stack size.  Using the -I option is
  773. not recommended!
  774.  
  775.  
  776. 10.7 DOS message `Sector not found'
  777. -----------------------------------
  778.  
  779. DOS seems to display that message if a file is opened twice (perhaps
  780. one handle for reading, one for writing).  For instance, this happens
  781. when GCC runs out of temporary files.  Look for files named like
  782. cca00002, ccz00002 etc. (the digits may vary) in your temporary
  783. directory and delete them.
  784.  
  785.  
  786. 11 emx messages
  787. ===============
  788.  
  789.  
  790. 11.1 emx messages (OS/2)
  791. ------------------------
  792.  
  793. core dumped
  794.  
  795.     The program cannot continue due to a fatal error (exception).  An
  796.     image of the program's memory has been written to a file named
  797.     `core'.  Please keep that file in case the author of the program
  798.     needs it for debugging.
  799.  
  800. emx.dll: Stack size too small...
  801.  
  802.     You tried to run an old program (which assumes that emx.dll
  803.     creates a stack object if the stack size is too small).  You
  804.     should run emxstack to fix the stack size.
  805.  
  806. Invalid option in EMXOPT
  807.  
  808.     An option in the EMXOPT environement variable is not understood by
  809.     emx.
  810.  
  811. Invalid syscall function code
  812.  
  813.     The program run by emx has called an invalid system function.
  814.     Most likely, you're using an emx.dll which is out of date.
  815.  
  816. WARNING: emx 0.9a or later required
  817.  
  818.     The program requires emx.dll 0.9a or later.  However, an older
  819.     version of emx.dll is active.  Make sure that the latest version
  820.     of emx.dll is in a directory pointed to by the LIBPATH statement
  821.     in your config.sys file.  Use
  822.  
  823.         emxrev -p c:\config.sys
  824.  
  825.     to list all emx dynamic link libraries reachable by the LIBPATH
  826.     statement of c:\config.sys (use the drive letter of your boot
  827.     drive instead of c:).  To simplify things, you should keep only
  828.     one version of each DLL.  Older programs work with newer emx DLLs,
  829.     but not vice versa.
  830.  
  831.  
  832. 11.2 emx messages (DOS)
  833. -----------------------
  834.  
  835. Abnormal program termination
  836.  
  837.     The program received the SIGABRT signal.  The abort() function was
  838.     called or SIGABRT was raised.
  839.  
  840. Bad environment
  841.  
  842.     The program name could not be found in the environment segment or
  843.     the environment segment is longer than 32768 bytes.  This should
  844.     not happen in practice.
  845.  
  846. Cannot create swap file
  847.  
  848.     The swap file could not be created.  Remedy: make sure the swap
  849.     file can be created in the directory given by the EMXTMP (or TMP)
  850.     environment variable.  If EMXTMP and TMP are not set, emx will
  851.     create the swap file in the root directory of the current drive.
  852.  
  853. Cannot enable A20
  854.  
  855.     emx tried to enable address line A20 and failed.  Remedy: contact
  856.     the author.
  857.  
  858. Cannot enable A20 via XMS
  859.  
  860.     emx tried to enable address line A20 by calling the XMS driver.
  861.     Unfortunately, A20 couldn't be enabled.  Remedy: unknown.
  862.  
  863. Cannot open program file
  864.  
  865.     The program file given on the emx command line could not be found
  866.     or opened.  Remedy: type the correct file name.  (This should not
  867.     happen with bound programs.)
  868.  
  869. Cannot read program file
  870.  
  871.     An error occured while reading the program file.  Remedy: make
  872.     sure the program file given on the emx command line is valid (this
  873.     does not apply to bound programs).  Maybe some other program
  874.     accesses that file.
  875.  
  876. core dumped
  877.  
  878.     The program cannot continue due to a fatal error (exception).  An
  879.     image of the program's memory has been written to a file named
  880.     `core'.  Please keep that file in case the author of the program
  881.     needs it for debugging.
  882.  
  883. DPMI not supported
  884.  
  885.     The current version of emx cannot use DPMI.  Maybe some future
  886.     version will do.  Remedy: end the DPMI server (MS Windows) or use
  887.     rsx.
  888.  
  889. emx not found
  890.  
  891.     The emx loader (emxl.exe) failed to find emx.exe.  Make sure that
  892.     emx.exe is in a directory listed in the PATH environment variable.
  893.     Alternatively, you can set the EMX environment variable to the
  894.     complete path name of emx.exe.
  895.  
  896. Exception ...
  897.  
  898.     The program run by emx tried to do something which is considered
  899.     illegal by the processor or by emx.  Remedy: report to the
  900.     supplier of the program.
  901.  
  902. Illegal moucall function
  903.  
  904.     The program run by emx has called an invalid system function.
  905.     Remedy: report to the supplier of the program.
  906.  
  907. Illegal syscall function
  908.  
  909.     The program run by emx has called an invalid system function.
  910.     Remedy: report to the supplier of the program.
  911.  
  912. Illegal viocall function
  913.  
  914.     The program run by emx has called an invalid system function.
  915.     Remedy: report to the supplier of the program.
  916.  
  917. Invalid arguments for DOS function xx
  918.  
  919.     The program run by emx has used invalid arguments for a system
  920.     function.  Remedy: report to the supplier of the program.
  921.  
  922. Invalid emx option
  923.  
  924.     An option in EMXOPT or set by emxbind is not understood by emx.
  925.     Remedy: check EMXOPT.  Use emxbind -i to display the options set
  926.     by emxbind.
  927.  
  928. Invalid program file
  929.  
  930.     The program file given on the emx command line (or bound to emx)
  931.     is corrupt.  Remedy: reload the program from diskette.  If this
  932.     doesn't help you should contact the supplier of the program.
  933.  
  934. Invalid special function code: xx
  935.  
  936.     The program run by emx has called an invalid system function.
  937.     Remedy: report to the supplier of the program.
  938.  
  939. Linear address space exhausted
  940.  
  941.     The program run by emx uses far too much memory.  Remedy: complain
  942.     to the author.
  943.  
  944. Nonmaskable interrupt (NMI) at xxxx:yyyyyyyy
  945.  
  946.     A nonmaskable interrupt occured.  Maybe this is due to a memory
  947.     error.  Remedy: if you are using DESQview, either set the
  948.     protection level to 0 or use the WATCHDOG=0 option of QEMM-386.
  949.     Otherwise, run a program for testing memory.
  950.  
  951. Out of memory
  952.  
  953.     There isn't enough memory for running emx.  Remedy: remove some
  954.     drivers and/or resident programs.  Or add memory to your machine.
  955.  
  956. Out of stacks
  957.  
  958.     emx ran out of local stacks.  Remedy: complain to the author.
  959.  
  960. Out of memory or swap space
  961.  
  962.     emx cannot write to the swap file because the disk is full.
  963.     Remedy: make sure there is enough space on the drive used for the
  964.     swap file.  Use the EMXTMP (or TMP) environment variable to tell
  965.     emx where to create the swap file.  If neither EMXTMP nor TMP is
  966.     set, emx will create the swap file in the root directory of the
  967.     current drive.
  968.  
  969. Out of swap space
  970.  
  971.     emx cannot write to the swap file because the disk is full.
  972.     Remedy: make sure there is enough space on the drive used for the
  973.     swap file.  Use the EMXTMP (or TMP) environment variable to tell
  974.     emx where to create the swap file.  If neither EMXTMP nor TMP is
  975.     set, emx will create the swap file in the root directory of the
  976.     current drive.
  977.  
  978. Process terminated by SIGINT
  979.  
  980.     You have stopped the program by hitting Ctrl-C or Ctrl-Break.
  981.  
  982. Process terminated by SIG...
  983.  
  984.     The program has been stopped due to a signal or exception.
  985.     Usually, this indicates a fatal error in the program.
  986.  
  987. Program aborted
  988.  
  989.     You have aborted the program by answering `Abort' after a critical
  990.     error had occured.
  991.  
  992. rsx not found, DPMI not supported by emx
  993.  
  994.     The current version of emx cannot use DPMI.  Therefore, the loader
  995.     tried to use rsx instead, but couldn't find rsx.  Remedy: install
  996.     rsx or end the DPMI server (MS Windows).
  997.  
  998. Swap file I/O error
  999.  
  1000.     emx couldn't read or write the swap file.
  1001.  
  1002. This program does not run in DOS mode of OS/2
  1003.  
  1004.     DOS emulation of OS/2 doesn't support emx.  Remedy: boot DOS or
  1005.     run the program in a OS/2 window
  1006.  
  1007. This program requires an 80386 CPU
  1008.  
  1009.     You need an 80386DX, 80386SX, i486 or later CPU for running emx.
  1010.     Remedy: get another computer.
  1011.  
  1012. This program requires DOS 3.0 or later
  1013.  
  1014.     If emx is bound with an application program into one executable,
  1015.     DOS 3.0 or later is required for execution.
  1016.  
  1017. Too many processes
  1018.  
  1019.     emx supports up to 4 processes.  You tried to start 5 or more
  1020.     processes.
  1021.  
  1022. Unexpected interrupt
  1023.  
  1024.     This cannot happen.  Remedy: report to the author.
  1025.  
  1026. Unsupported VDISK.SYS version
  1027.  
  1028.     emx doesn't support the vdisk.sys device driver you are using.
  1029.     Remedy: remove VDISK.SYS or use a different version.  emx should
  1030.     work with vdisk.sys 3.3 or later.
  1031.  
  1032. Unsupported XMS version
  1033.  
  1034.     emx requires himem.sys 2.06 or later (older versions are too
  1035.     buggy).  Remedy: get a newer himem.sys.  If you are not using
  1036.     himem.sys, use the -O option of emx and tell the author whether
  1037.     this works or not.
  1038.  
  1039. Unusable interrupt vector mappings set by VCPI server
  1040.  
  1041.     The configuration of the VCPI server (EMS driver) is illegal.
  1042.     Remedy: read the manual of the EMS driver.
  1043.  
  1044. Use emxbind
  1045.  
  1046.     You tried to run emxl.exe, which doesn't make sense.  emxl.exe is
  1047.     designed to be bound into an executable file by emxbind.
  1048.  
  1049. Virtual mode not supported without VCPI
  1050.  
  1051.     A VCPI server is required to run emx if the CPU is in virtual
  1052.     mode.  You will get this message if you're using an EMS driver
  1053.     (EMS emulator) which doesn't support VCPI or if you have disabled
  1054.     EMS.  Remedy: remove the EMS driver, use an EMS driver which
  1055.     supports VCPI or enable EMS if it has been disabled (for instance,
  1056.     remove the NOEMS keyword from the command line of the EMS driver).
  1057.  
  1058. Wrong emx version
  1059.  
  1060.     The version of emx.exe does not match the version the program was
  1061.     compiled for.  Remedy: use the copy of emx.exe that comes with the
  1062.     program.  If you are using different programs which need different
  1063.     versions of emx.exe, use the EMX environment variable to set the
  1064.     path name of the correct version of emx.exe before running a
  1065.     program which requires a version different from the default
  1066.     emx.exe.  You can also use emxbind -u to put the correct version
  1067.     of emx.exe into the executable files.
  1068.  
  1069.  
  1070. 12 Obtaining the complete emx package
  1071. =====================================
  1072.  
  1073. emx is available for anonymous ftp on
  1074.  
  1075.     ftp.uni-stuttgart.de [129.69.18.15]: /pub/systems/os2/emx-0.9a
  1076.     ftp-os2.cdrom.com:   [192.153.46.2]: /os2/32bit/unix/emx09a
  1077.     src.doc.ic.ac.uk      [146.169.2.1]: /pub/packages/os2/32bit/unix/emx09a
  1078.     ftp.informatik.tu-muenchen.de [131.159.0.198]:
  1079.                                          /pub/comp/os/os2/gnu/emx+gcc
  1080.  
  1081.  
  1082. 13 The author of emx
  1083. ====================
  1084.  
  1085. The author of emx is
  1086.  
  1087.     Eberhard Mattes
  1088.     Teckstrasse 81                                      (TeX: Teckstra\ss e)
  1089.     D-71696 Moeglingen                                  (TeX: M\"oglingen)
  1090.     Germany
  1091.  
  1092. Internet: mattes@azu.informatik.uni-stuttgart.de  (subject to change)
  1093.  
  1094. No telephone calls please!  It must be stressed that the author does
  1095. not reply to letters if you don't include return postage
  1096. (international postal reply coupon if you are outside Germany) and a
  1097. self-addressed envelope.
  1098.  
  1099. --------------------------- END OF EMXRT.DOC --------------------------------
  1100.